package flextv.search.logic {

import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import flash.utils.setTimeout;

import flextv.core.logic.Logger;
import flextv.search.vo.SearchItem;

import mx.collections.ArrayCollection;
import mx.logging.ILogger;
import mx.rpc.IResponder;

public class MockSearchService extends EventDispatcher implements ISearchService {
	
	private static const LOG: ILogger = Logger.getLog(MockSearchService);
	
	public function MockSearchService(target: IEventDispatcher=null) {
		super(target);
	}
	
	public function search(term: String, responder: IResponder): void {
		LOG.debug("search(term="+term+")");
		
		setTimeout(function(): void {
			
			responder.result(new ArrayCollection([
				new SearchItem("az7Keh3aI8e", "Dummy Search Item #1", 72)
			]));
			
		}, 200); // sleep
		
		
	}
	
}
}